﻿using System;


namespace EuclideanAlgorithm
{
    class Program
    {
        static int gcd(int firstValue, int secondValue)
        {
            if (secondValue == 0)
            {
                return firstValue;
            }
            return gcd(secondValue, firstValue % secondValue);
        }
        static void Main(string[] args)
        {
            int a = 120;
            int b = 30;
            Console.WriteLine(gcd(a,b));
        }
    }
}
